import { RouteRecordRaw } from "vue-router";
import HomeView from "@/views/HomeView.vue";
import NoAuthView from "@/views/errors/NoAuthView.vue";
import NotFound from "@/views/errors/NotFound.vue";
import CarOut from "@/views/parking/CarOut.vue";
import CostingView from "@/views/CostingView.vue";

export const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "PARKING",
    component: HomeView,
  },
  {
    path: "/out",
    name: "OUT",
    component: CarOut,
  },
  {
    path: "/cost",
    name: "cost",
    component: CostingView,
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: "/noAuth",
    name: "无权限",
    component: NoAuthView,
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: "/404/",
    name: "404",
    component: NotFound,
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: "/:catchAll(.*)",
    redirect: "/404/",
  },
];
